﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

namespace Camc.Quality.Migrations
{
    public partial class add_bomMationg : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AlterColumn<DateTime>(
                name: "CompleteTime",
                table: "StoreStocks",
                nullable: true,
                oldClrType: typeof(DateTime));


            migrationBuilder.AddColumn<Guid>(
                name: "ModuleId",
                table: "CollectBomManagers",
                nullable: false,
                defaultValue: new Guid("00000000-0000-0000-0000-000000000000"));

            migrationBuilder.AddColumn<Guid>(
                name: "ModuleId",
                table: "BomDesigns",
                nullable: false,
                defaultValue: new Guid("00000000-0000-0000-0000-000000000000"));

            migrationBuilder.AddColumn<Guid>(
                name: "SendTimeId",
                table: "BomDesigns",
                nullable: false,
                defaultValue: new Guid("00000000-0000-0000-0000-000000000000"));
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {

            migrationBuilder.DropColumn(
                name: "ModuleId",
                table: "CollectBomManagers");

            migrationBuilder.DropColumn(
                name: "ModuleId",
                table: "BomDesigns");

            migrationBuilder.DropColumn(
                name: "SendTimeId",
                table: "BomDesigns");

            migrationBuilder.AlterColumn<DateTime>(
                name: "CompleteTime",
                table: "StoreStocks",
                nullable: false,
                oldClrType: typeof(DateTime),
                oldNullable: true);
        }
    }
}
